package terminalresource

import (
	dbModel "ZHONGYIHANGYAN/bean/dbModel"
	"ZHONGYIHANGYAN/mysql"
)

type TerminalResourceManage struct {
	mysql.DataBase
}

var defaultTerminalResourceManage = &TerminalResourceManage{}

func Manage() *TerminalResourceManage {
	return defaultTerminalResourceManage
}

// 初始化指标表
func InitTable(DB *mysql.MysqlGorm) {
	defaultTerminalResourceManage.DataBase = DB
	defaultTerminalResourceManage.autoMigrate()
}

func (m *TerminalResourceManage) autoMigrate() {
	m.DataBase.AutoMigrate(&dbModel.TerminalResource{})
}
